package com.spark.prepareJob.tags
import com.spark.beans.Logs
import com.spark.prepareJob.constants.AdConstants
import com.spark.utils.StringUtils

/**
  * 1）广告位类型（标签格式：LC03->1或者LC16->2）xx为数字，小于10 补0
  * ->是权重，这里使用次数做一个说明
  * (userid,（01, 1）)
  * (userid,（02, 1）)
  * (userid,（02, 1）)
  *
  */
object AdPositionTags extends Tags {
  override def extractTags(log: Logs): Map[String, Int] = {
    val adPosition = log.adspacetype
    Map[String,Int](AdConstants.AD_PREFIX_AD_POSITION + StringUtils.fullFillStr(adPosition+"") -> 1 )
  }
}
